Optimal. Leaf size=230 \[ -\frac {3 \left (4 a^2-10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a-b}}\right )}{32 (a-b)^{5/2} d}+\frac {3 \left (4 a^2+10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a+b}}\right )}{32 (a+b)^{5/2} d}-\frac {\sec ^4(c+d x) (b-a \sin (c+d x)) \sqrt {a+b \sin (c+d x)}}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (b \left (a^2-7 b^2\right )-6 a \left (a^2-2 b^2\right ) \sin (c+d x)\right )}{16 \left (a^2-b^2\right )^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 230, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2747, 755, 837,
841, 1180, 212} \begin {gather*} -\frac {3 \left (4 a^2-10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a-b}}\right )}{32 d (a-b)^{5/2}}+\frac {3 \left (4 a^2+10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a+b}}\right )}{32 d (a+b)^{5/2}}-\frac {\sec ^4(c+d x) (b-a \sin (c+d x)) \sqrt {a+b \sin (c+d x)}}{4 d \left (a^2-b^2\right )}-\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (b \left (a^2-7 b^2\right )-6 a \left (a^2-2 b^2\right ) \sin (c+d x)\right )}{16 d \left (a^2-b^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 755
Rule 837
Rule 841
Rule 1180
Rule 2747
Rubi steps
\begin {align*} \int \frac {\sec ^5(c+d x)}{\sqrt {a+b \sin (c+d x)}} \, dx &=\frac {b^5 \text {Subst}\left (\int \frac {1}{\sqrt {a+x} \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {\sec ^4(c+d x) (b-a \sin (c+d x)) \sqrt {a+b \sin (c+d x)}}{4 \left (a^2-b^2\right ) d}+\frac {b^3 \text {Subst}\left (\int \frac {\frac {1}{2} \left (6 a^2-7 b^2\right )+\frac {5 a x}{2}}{\sqrt {a+x} \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 \left (a^2-b^2\right ) d}\\ &=-\frac {\sec ^4(c+d x) (b-a \sin (c+d x)) \sqrt {a+b \sin (c+d x)}}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (b \left (a^2-7 b^2\right )-6 a \left (a^2-2 b^2\right ) \sin (c+d x)\right )}{16 \left (a^2-b^2\right )^2 d}-\frac {b \text {Subst}\left (\int \frac {-\frac {3}{4} \left (4 a^4-9 a^2 b^2+7 b^4\right )-\frac {3}{2} a \left (a^2-2 b^2\right ) x}{\sqrt {a+x} \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}\\ &=-\frac {\sec ^4(c+d x) (b-a \sin (c+d x)) \sqrt {a+b \sin (c+d x)}}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (b \left (a^2-7 b^2\right )-6 a \left (a^2-2 b^2\right ) \sin (c+d x)\right )}{16 \left (a^2-b^2\right )^2 d}-\frac {b \text {Subst}\left (\int \frac {\frac {3}{2} a^2 \left (a^2-2 b^2\right )-\frac {3}{4} \left (4 a^4-9 a^2 b^2+7 b^4\right )-\frac {3}{2} a \left (a^2-2 b^2\right ) x^2}{-a^2+b^2+2 a x^2-x^4} \, dx,x,\sqrt {a+b \sin (c+d x)}\right )}{4 \left (a^2-b^2\right )^2 d}\\ &=-\frac {\sec ^4(c+d x) (b-a \sin (c+d x)) \sqrt {a+b \sin (c+d x)}}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (b \left (a^2-7 b^2\right )-6 a \left (a^2-2 b^2\right ) \sin (c+d x)\right )}{16 \left (a^2-b^2\right )^2 d}-\frac {\left (3 \left (4 a^2-10 a b+7 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a-b-x^2} \, dx,x,\sqrt {a+b \sin (c+d x)}\right )}{32 (a-b)^2 d}+\frac {\left (3 \left (4 a^2+10 a b+7 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b-x^2} \, dx,x,\sqrt {a+b \sin (c+d x)}\right )}{32 (a+b)^2 d}\\ &=-\frac {3 \left (4 a^2-10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a-b}}\right )}{32 (a-b)^{5/2} d}+\frac {3 \left (4 a^2+10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a+b}}\right )}{32 (a+b)^{5/2} d}-\frac {\sec ^4(c+d x) (b-a \sin (c+d x)) \sqrt {a+b \sin (c+d x)}}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (b \left (a^2-7 b^2\right )-6 a \left (a^2-2 b^2\right ) \sin (c+d x)\right )}{16 \left (a^2-b^2\right )^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.90, size = 244, normalized size = 1.06 \begin {gather*} \frac {-3 (a+b)^{5/2} \left (4 a^2-10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a-b}}\right )+\sqrt {a-b} \left (3 (a-b)^2 \left (4 a^2+10 a b+7 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a+b}}\right )+\sqrt {a+b} \sec ^4(c+d x) \sqrt {a+b \sin (c+d x)} \left (-9 a^2 b+15 b^3+\left (-a^2 b+7 b^3\right ) \cos (2 (c+d x))+a \left (11 a^2-14 b^2\right ) \sin (c+d x)+3 \left (a^3-2 a b^2\right ) \sin (3 (c+d x))\right )\right )}{32 \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(579\) vs.
\(2(206)=412\).
time = 3.43, size = 580, normalized size = 2.52
method | result | size |
default | \(\frac {-\frac {3 b \left (a +b \sin \left (d x +c \right )\right )^{\frac {3}{2}} a}{16 \left (b \sin \left (d x +c \right )-b \right )^{2} \left (a^{2}+2 a b +b^{2}\right )}-\frac {9 b^{2} \left (a +b \sin \left (d x +c \right )\right )^{\frac {3}{2}}}{32 \left (b \sin \left (d x +c \right )-b \right )^{2} \left (a^{2}+2 a b +b^{2}\right )}+\frac {3 b \sqrt {a +b \sin \left (d x +c \right )}\, a}{16 \left (b \sin \left (d x +c \right )-b \right )^{2} \left (a +b \right )}+\frac {11 b^{2} \sqrt {a +b \sin \left (d x +c \right )}}{32 \left (b \sin \left (d x +c \right )-b \right )^{2} \left (a +b \right )}+\frac {3 \arctanh \left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {a +b}}\right ) a^{2}}{8 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {a +b}}+\frac {15 \arctanh \left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {a +b}}\right ) a b}{16 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {a +b}}+\frac {21 \arctanh \left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {a +b}}\right ) b^{2}}{32 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {a +b}}-\frac {3 b \left (a +b \sin \left (d x +c \right )\right )^{\frac {3}{2}} a}{16 \left (b \sin \left (d x +c \right )+b \right )^{2} \left (a^{2}-2 a b +b^{2}\right )}+\frac {9 b^{2} \left (a +b \sin \left (d x +c \right )\right )^{\frac {3}{2}}}{32 \left (b \sin \left (d x +c \right )+b \right )^{2} \left (a^{2}-2 a b +b^{2}\right )}+\frac {3 b \sqrt {a +b \sin \left (d x +c \right )}\, a}{16 \left (b \sin \left (d x +c \right )+b \right )^{2} \left (a -b \right )}-\frac {11 b^{2} \sqrt {a +b \sin \left (d x +c \right )}}{32 \left (b \sin \left (d x +c \right )+b \right )^{2} \left (a -b \right )}+\frac {3 \arctan \left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {-a +b}}\right ) a^{2}}{8 \left (a^{2}-2 a b +b^{2}\right ) \sqrt {-a +b}}-\frac {15 \arctan \left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {-a +b}}\right ) a b}{16 \left (a^{2}-2 a b +b^{2}\right ) \sqrt {-a +b}}+\frac {21 \arctan \left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {-a +b}}\right ) b^{2}}{32 \left (a^{2}-2 a b +b^{2}\right ) \sqrt {-a +b}}}{d}\) | \(580\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{5}{\left (c + d x \right )}}{\sqrt {a + b \sin {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 419 vs.
\(2 (208) = 416\).
time = 4.70, size = 419, normalized size = 1.82 \begin {gather*} \frac {b^{5} {\left (\frac {3 \, {\left (4 \, a^{2} - 10 \, a b + 7 \, b^{2}\right )} \arctan \left (\frac {\sqrt {b \sin \left (d x + c\right ) + a}}{\sqrt {-a + b}}\right )}{{\left (a^{2} b^{5} - 2 \, a b^{6} + b^{7}\right )} \sqrt {-a + b}} - \frac {3 \, {\left (4 \, a^{2} + 10 \, a b + 7 \, b^{2}\right )} \arctan \left (\frac {\sqrt {b \sin \left (d x + c\right ) + a}}{\sqrt {-a - b}}\right )}{{\left (a^{2} b^{5} + 2 \, a b^{6} + b^{7}\right )} \sqrt {-a - b}} - \frac {2 \, {\left (6 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {7}{2}} a^{3} - 18 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {5}{2}} a^{4} + 18 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a^{5} - 6 \, \sqrt {b \sin \left (d x + c\right ) + a} a^{6} - 12 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {7}{2}} a b^{2} + 35 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {5}{2}} a^{2} b^{2} - 44 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a^{3} b^{2} + 21 \, \sqrt {b \sin \left (d x + c\right ) + a} a^{4} b^{2} + 7 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {5}{2}} b^{4} + 2 \, {\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a b^{4} - 4 \, \sqrt {b \sin \left (d x + c\right ) + a} a^{2} b^{4} - 11 \, \sqrt {b \sin \left (d x + c\right ) + a} b^{6}\right )}}{{\left (a^{4} b^{4} - 2 \, a^{2} b^{6} + b^{8}\right )} {\left ({\left (b \sin \left (d x + c\right ) + a\right )}^{2} - 2 \, {\left (b \sin \left (d x + c\right ) + a\right )} a + a^{2} - b^{2}\right )}^{2}}\right )}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{{\cos \left (c+d\,x\right )}^5\,\sqrt {a+b\,\sin \left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________